<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script type="text/javascript" src="../js/vue.js"></script>
    <script type="text/javascript" src="../js/vue-router.js"></script>
    <script type="text/javascript" src="../js/axios.min.js"></script>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
</head>

<body>
    <div id="app" class="container">
        <router-link to="/login">登录</router-link>
        <router-link to="/register">注册</router-link>
        <router-view></router-view>
    </div>

    <script>
        var login = {
            template: `<h2>登录</h2>`
        }

        var register = {
            template: `<h2>注册</h2>`
        }

        var routerObj = new VueRouter({
            routes: [{
                path: '/login',
                component: login
            }, {
                path: '/register',
                component: register
            }]
        })

        var vm = new Vue({
            el: '#app',
            data: {},
            methods: {},
            router: routerObj
        });
    </script>
</body>

</html>